package 测试案例;
import java.util.*;
public class Test3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str1 = sc.nextLine();
        String str2 = sc.nextLine();

        char[] ch1 = str1.toCharArray();
        char[] ch2 = str2.toCharArray();
        for (int i = 0; i < ch1.length; i++) {
            for (int j = 0; j < ch2.length; j++) {
                if(ch1[i] == ch2[j]){
                    ch1[i] = '*';
                }
            }
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < ch1.length; i++) {
            if(ch1[i] != '*'){
                stringBuilder.append(ch1[i]);
            }
        }
        str1 = stringBuilder.toString();
        System.out.println(str1);
    }
}
